package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.vo.BindElderDeviceVo;
import com.zzyl.nursing.vo.MyFamilyVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import com.zzyl.nursing.domain.FamilyMemberElder;
import org.apache.ibatis.annotations.Param;

/**
 * 老人家属关联Mapper接口
 * 
 * @author alexis
 * @date 2025-03-14
 */
@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder> {
    /**
     * 查询老人家属关联
     *
     * @param id 老人家属关联主键
     * @return 老人家属关联
     */
    public FamilyMemberElder selectFamilyMemberElderById(Long id);

    /**
     * 查询老人家属关联列表
     *
     * @param familyMemberElder 老人家属关联
     * @return 老人家属关联集合
     */
    public List<FamilyMemberElder> selectFamilyMemberElderList(FamilyMemberElder familyMemberElder);

    /**
     * 新增老人家属关联
     *
     * @param familyMemberElder 老人家属关联
     * @return 结果
     */
    public int insertFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 修改老人家属关联
     *
     * @param familyMemberElder 老人家属关联
     * @return 结果
     */
    public int updateFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 删除老人家属关联
     *
     * @param id 老人家属关联主键
     * @return 结果
     */
    public int deleteFamilyMemberElderById(Long id);

    /**
     * 批量删除老人家属关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFamilyMemberElderByIds(Long[] ids);

    /**
     * 查询家人列表
     *
     * @param userId
     */
    List<MyFamilyVo> selectMyFamily(@Param("userId") Long userId);

    /**
     * 分页查询
     *
     * @param memberId
     * @return
     */
    List<BindElderDeviceVo> queryPage(Long memberId);

}

